import Mock from "mockjs";

const { mock } = Mock;

//模拟待接订单列表数据
export const getList = req => {
  const { pageSize:size } = JSON.parse(req.body);

  const total = 136;
  const list = [];

  for (let index = 0; index < size; index++) {
    let data = mock({
      id: mock("@id"),
      "type|1": ["专业陪诊", "专业导诊", "专业陪护"],
      orderNum: mock("@guid"),
      serviceTime: mock("@datetime(2021-MM-dd HH:mm:ss)"),      
      hospital: mock("@county(true)") + "医院",
      "department|1": [
        "传染科",
        "不孕不育科",
        "按摩科",
        "保健科",
        "变态反应科"
      ],
      "income|10-1000": 1
    });

    list.push(data);
  }

  return { code: 200, total, data: list };
};